IdeaBlade.EntityModel Assembly > IdeaBlade.EntityModel Namespace > EntityQueryExtensions Class > ToQuery Method : ToQuery<T>(IEnumerable<T>) Method |
'Declaration
<ExtensionAttribute()> Public Overloads Shared Function ToQuery(Of T As {Class, IEntity})( _ ByVal entities As IEnumerable(Of T) _ ) As EntityQuery(Of T)
'Usage
Dim entities As IEnumerable(Of T) Dim value As EntityQuery(Of T) value = EntityQueryExtensions.ToQuery(Of T)(entities)
[Extension()] public static EntityQuery<T> ToQuery<T>( IEnumerable<T> entities ) where T: class, IEntity
Exception | Description |
---|---|
System.ArgumentOutOfRangeException | Thrown if the entity list passed is empty. |
var mgr = new DomainModelEntityManager(); var customers = mgr.Customers.Take(3).ToList(); var query = customers.ToQuery();
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2